home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb / foo / Makefile < prev    next >
Encoding:
Makefile  |  1991-07-03  |  7.8 KB  |  367 lines

  1. # 1 "tmp.c"
  2.  
  3.  
  4.  
  5.  
  6. XGDB=
  7.  
  8. bindir=/usr/local/bin
  9.  
  10. xbindir=$(bindir)
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. CC=cc
  24.  
  25.  
  26.  
  27.  
  28.  
  29. YACC=bison -y -v
  30.  
  31. SHELL=/bin/sh
  32. MAKE=make
  33.  
  34.  
  35.  
  36.  
  37. CC-LD=${CC}
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. GLOBAL_CFLAGS = -g 
  51. CFLAGS = -I. ${HAVE_VPRINTF_DEFINE} ${GLOBAL_CFLAGS}
  52.  
  53.  
  54. LDFLAGS = $(CFLAGS)
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. OBSTACK = obstack.o
  64. OBSTACK1 = obstack.o
  65.  
  66. # 68 "tmp.c"
  67.  
  68. REGEX = 
  69. REGEX1 = 
  70.  
  71.  
  72. # 76 "tmp.c"
  73.  
  74. ALLOCA = 
  75. ALLOCA1 =
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83. GNU_MALLOC = malloc.o
  84.  
  85.  
  86.  
  87.  
  88. MALLOC_FLAGS = ${CFLAGS} -Drcheck -Dbotch=fatal_dump_core -DMSTATS
  89.  
  90.  
  91. # 96 "tmp.c"
  92.  
  93. SYSV_DEFINE =
  94.  
  95.  
  96.  
  97.  
  98. # 104 "tmp.c"
  99.  
  100. MUNCH_DEFINE = ${SYSV_DEFINE}
  101.  
  102.  
  103.  
  104.  
  105. TERMCAP = -ltermcap
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. CLIBS = ${ADD_FILES} ${TERMCAP} 
  113.  
  114. ADD_FILES = ${OBSTACK} ${REGEX} ${ALLOCA} ${GNU_MALLOC}
  115. ADD_DEPS = ${OBSTACK1} ${REGEX1} ${ALLOCA1} ${GNU_MALLOC}
  116.  
  117. SFILES = blockframe.c breakpoint.c dbxread.c coffread.c command.c core.c \
  118.      environ.c eval.c expprint.c findvar.c infcmd.c inflow.c infrun.c \
  119.      kdb-start.c main.c printcmd.c \
  120.      remote.c source.c stack.c standalone.c stuff.c symmisc.c symtab.c \
  121.      utils.c valarith.c valops.c valprint.c values.c version.c expread.y \
  122.      xgdb.c
  123.  
  124. DEPFILES = umax-dep.c gould-dep.c default-dep.c sun3-dep.c \
  125.        sparc-dep.c hp9k320-dep.c hp300bsd-dep.c news-dep.c i386-dep.c \
  126.        symmetry-dep.c convex-dep.c altos-dep.c isi-dep.c pyr-dep.c
  127.  
  128. PINSNS = gld-pinsn.c i386-pinsn.c sparc-pinsn.c vax-pinsn.c m68k-pinsn.c \
  129.      ns32k-pinsn.c convex-pinsn.c pyr-pinsn.c
  130.  
  131. HFILES = command.h defs.h environ.h expression.h frame.h getpagesize.h \
  132.      inferior.h symseg.h symtab.h value.h wait.h \
  133.      a.out.encap.h a.out.gnu.h stab.gnu.h 
  134.  
  135. OPCODES = m68k-opcode.h pn-opcode.h sparc-opcode.h npl-opcode.h vax-opcode.h \
  136.       ns32k-opcode.h convex-opcode.h pyr-opcode.h
  137.  
  138. MFILES = m-hp9k320.h m-hp300bsd.h m-i386.h m-i386gas.h \
  139.   m-i386-sv32.h m-i386g-sv32.h m-isi.h m-merlin.h \
  140.   m-altos.h m-news.h m-newsos3.h m-npl.h m-pn.h \
  141.   m-sparc.h m-sun2.h m-sun3.h m-sun2os4.h \
  142.   m-sun3os4.h m-sun4os4.h m-umax.h m-vax.h m-symmetry.h m-convex.h \
  143.   m-pyr.h
  144.  
  145.  
  146.  
  147.  
  148. READLINE = readline.c history.c funmap.c \
  149.   emacs_keymap.c vi_keymap.c vi_mode.c keymaps.c \
  150.   readline.h history.h keymaps.h chardefs.h \
  151.   inc-readline.texinfo inc-history.texinfo \
  152.   readline.texinfo history.texinfo \
  153.   Makefile ChangeLog
  154.  
  155. REMOTE_EXAMPLES = remote-sa.m68k.shar remote-multi.shar
  156.  
  157. POSSLIBS = obstack.h obstack.c regex.c regex.h malloc.c alloca.c
  158.  
  159. TESTS = testbpt.c testfun.c testrec.c testreg.c testregs.c
  160.  
  161. OTHERS = Makefile.dist createtags munch config.gdb ChangeLog README TAGS \
  162.      gdb.texinfo .gdbinit COPYING expread.tab.c stab.def \
  163.      XGDB-README copying.c Projects Convex.notes copying.awk hp-include
  164.  
  165. TAGFILES = ${SFILES} ${DEPFILES} ${PINSNS} ${HFILES} ${OPCODES} ${MFILES} \
  166.        ${POSSLIBS} 
  167. TARFILES = ${TAGFILES} ${OTHERS} ${REMOTE_EXAMPLES}
  168.  
  169. OBS = main.o blockframe.o breakpoint.o findvar.o stack.o source.o \
  170.     values.o eval.o valops.o valarith.o valprint.o printcmd.o \
  171.     symtab.o symmisc.o coffread.o dbxread.o infcmd.o infrun.o remote.o \
  172.     command.o utils.o expread.o expprint.o pinsn.o environ.o version.o \
  173.     copying.o ${READLINEOBS}
  174.  
  175. TSOBS = core.o inflow.o dep.o
  176.  
  177. NTSOBS = standalone.o
  178.  
  179. TSSTART = /lib/crt0.o
  180.  
  181. NTSSTART = kdb-start.o
  182.  
  183. RL_LIB = readline/libreadline.a
  184.  
  185.  
  186.  
  187.  
  188. MD=
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. TARGET_ARCH=
  197.  
  198. all: gdb $(XGDB)
  199.  
  200. install: gdb $(XGDB)
  201.     cp gdb $(bindir)/gdb.new
  202.     mv $(bindir)/gdb.new $(bindir)/gdb
  203.     -if [ "$(XGDB)" = xgdb ]; then \
  204.         cp xgdb $(xbindir)/xgdb.new; \
  205.         mv $(xbindir)/xgdb.new $(xbindir)xgdb; \
  206.     fi
  207.  
  208. gdb : $(OBS) $(TSOBS) ${ADD_DEPS} ${RL_LIB}
  209.     rm -f init.c
  210.     ./munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
  211.     ${CC-LD} $(LDFLAGS) -o gdb init.c $(OBS) $(TSOBS) ${RL_LIB} $(CLIBS)
  212.  
  213.  
  214.  
  215.  
  216. gdb1 : gdb
  217.     cp gdb gdb1
  218.  
  219. Makefile : Makefile.dist
  220.     cp Makefile.dist tmp.c
  221.     $(CC) -E >Makefile tmp.c $(MD) "-DM_MAKEDEFINE=$(MD)"
  222.     -rm tmp.c
  223.  
  224.  
  225.  
  226.  
  227. xgdb : $(OBS) $(TSOBS) xgdb.o ${ADD_DEPS} ${RL_LIB}
  228.     rm -f init.c
  229.     ./munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) xgdb.o > init.c
  230.     $(CC-LD) $(LDFLAGS) -o xgdb init.c $(OBS) $(TSOBS) xgdb.o \
  231.     -lXaw -lXmu -lXt -lX11 ${RL_LIB} $(CLIBS)
  232.  
  233.  
  234.  
  235.  
  236.  
  237. kdb : $(NTSSTART) $(OBS) $(NTSOBS) ${ADD_DEPS} ${RL_LIB}
  238.     rm -f init.c
  239.     ./munch ${MUNCH_DEFINE} $(OBS) $(NTSOBS) > init.c
  240.     $(CC) $(LDFLAGS) -c init.c $(CLIBS) 
  241.     ld -o kdb $(NTSSTART) $(OBS) $(NTSOBS) init.o ${RL_LIB} -lc $(CLIBS)
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249. TAGS: ${TAGFILES}
  250.     createtags ${TAGFILES}
  251. tags: TAGS
  252.  
  253. gdb.tar: ${TARFILES}
  254.     rm -f gdb.tar
  255.     mkdir dist-gdb
  256.     cd dist-gdb ; for i in ${TARFILES} ; do ln -s ../$$i . ; done
  257.     mkdir dist-gdb/readline
  258.     cd dist-gdb/readline ; for i in ${READLINE} ; do ln -s ../../readline/$$i . ; done
  259.     tar chf gdb.tar dist-gdb
  260.     rm -rf dist-gdb
  261.  
  262.  
  263.  
  264.  
  265. gdb.tar.Z: gdb.tar
  266.     if [ -f gdb.tar.Z ]; then rm -f gdb.tar.Z; else true; fi
  267.     compress gdb.tar
  268.  
  269. clean:
  270.     rm -f ${OBS} ${TSOBS} ${NTSOBS} ${OBSTACK} ${REGEX} ${GNU_MALLOC}
  271.     rm -f init.c init.o
  272.     rm -f xgdb.o xgdb
  273.     rm -f gdb core gdb.tar gdb.tar.Z make.log
  274.     rm -f gdb[0-9]
  275.     cd readline ; make clean
  276.  
  277. distclean: clean expread.tab.c TAGS
  278.     rm -f dep.c opcode.h param.h pinsn.c config.status
  279.     rm -f y.output yacc.acts yacc.tmp
  280.     rm -f ${TESTS} Makefile
  281.  
  282. realclean: clean
  283.     rm -f expread.tab.c TAGS
  284.     rm -f dep.c opcode.h param.h pinsn.c config.status
  285.     rm -f Makefile
  286.  
  287. xgdb.o : defs.h param.h symtab.h frame.h
  288.  
  289.  
  290. copying.c : COPYING copying.awk
  291.     awk -f copying.awk < COPYING > copying.c
  292.  
  293. expread.tab.c : expread.y
  294.     @echo 'Expect 4 shift/reduce conflict.'
  295.     ${YACC} expread.y
  296.     mv y.tab.c expread.tab.c
  297.  
  298. expread.o : expread.tab.c defs.h param.h symtab.h frame.h expression.h
  299.     $(CC) -c ${CFLAGS} expread.tab.c
  300.     mv expread.tab.o expread.o
  301.  
  302. readline/libreadline.a : force_update
  303.     cd readline ; ${MAKE} "SYSV=${SYSV_DEFINE}" \
  304.         "DEBUG_FLAGS=${GLOBAL_CFLAGS}" "CC=${CC}" libreadline.a
  305.  
  306. force_update :
  307.  
  308.  
  309. malloc.o : malloc.c
  310.     ${CC} -c ${MALLOC_FLAGS} malloc.c
  311.  
  312.  
  313.  
  314. dep.o : dep.c config.status defs.h param.h frame.h inferior.h obstack.h \
  315.     a.out.encap.h
  316.  
  317.  
  318.  
  319. pinsn.o : pinsn.c config.status defs.h param.h symtab.h obstack.h symseg.h \
  320.       frame.h opcode.h
  321.  
  322.  
  323.  
  324.  
  325.  
  326. blockframe.o : defs.h param.h config.status symtab.h obstack.h symseg.h frame.h 
  327. breakpoint.o : defs.h param.h config.status symtab.h obstack.h symseg.h frame.h
  328. coffread.o : defs.h param.h mipscoff.c config.status 
  329. command.o : command.h defs.h
  330. core.o : defs.h  param.h config.status a.out.encap.h
  331. dbxread.o : param.h config.status defs.h symtab.h obstack.h symseg.h a.out.encap.h \
  332.         stab.gnu.h
  333. environ.o : environ.h 
  334. eval.o : defs.h  param.h config.status symtab.h obstack.h symseg.h value.h expression.h 
  335. expprint.o : defs.h symtab.h obstack.h symseg.h param.h config.status expression.h
  336. findvar.o : defs.h param.h config.status symtab.h obstack.h symseg.h frame.h value.h 
  337. infcmd.o : defs.h  param.h config.status symtab.h obstack.h symseg.h frame.h inferior.h \
  338.        environ.h value.h
  339. inflow.o : defs.h  param.h config.status frame.h inferior.h
  340. infrun.o : defs.h  param.h config.status symtab.h obstack.h symseg.h frame.h inferior.h \
  341.        wait.h
  342. kdb-start.o : defs.h param.h config.status 
  343. main.o : defs.h  command.h param.h config.status
  344. malloc.o :  getpagesize.h
  345. obstack.o : obstack.h 
  346. printcmd.o :  defs.h param.h config.status frame.h symtab.h obstack.h symseg.h value.h \
  347.           expression.h 
  348. regex.o : regex.h 
  349. remote.o : defs.h  param.h config.status frame.h inferior.h wait.h
  350. source.o : defs.h  symtab.h obstack.h symseg.h param.h config.status
  351. stack.o :  defs.h param.h config.status symtab.h obstack.h symseg.h frame.h 
  352. standalone.o : defs.h param.h config.status symtab.h obstack.h symseg.h frame.h \
  353.            inferior.h wait.h 
  354. symmisc.o : defs.h symtab.h obstack.h symseg.h obstack.h 
  355. symtab.o : defs.h  symtab.h obstack.h symseg.h param.h config.status  obstack.h
  356. utils.o : defs.h  param.h config.status 
  357. valarith.o : defs.h param.h config.status symtab.h obstack.h symseg.h value.h expression.h 
  358. valops.o :  defs.h param.h config.status symtab.h obstack.h symseg.h value.h frame.h \
  359.         inferior.h
  360. valprint.o :  defs.h param.h config.status symtab.h obstack.h symseg.h value.h 
  361. values.o :  defs.h param.h config.status symtab.h obstack.h symseg.h value.h 
  362.  
  363. robotussin.h : getpagesize.h   
  364. symtab.h : obstack.h symseg.h 
  365. a.out.encap.h : a.out.gnu.h
  366.  
  367.